package com.rongzhe.house.ui.activity;

import android.Manifest;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.design.widget.Snackbar;
import android.support.v4.app.ActivityCompat;

import com.baidu.location.BDAbstractLocationListener;
import com.baidu.location.BDLocation;
import com.baidu.location.LocationClient;
import com.baidu.location.LocationClientOption;
import com.rongzhe.house.R;
import com.rongzhe.house.manager.PositionManager;
import com.rongzhe.house.presenter.BasePresenter;
import com.rongzhe.house.presenter.WelcomPresenter;
import com.rongzhe.house.service.LocationService;
import com.rongzhe.house.ui.view.BannerView;
import com.rongzhe.house.utils.Log;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;
import me.iwf.photopicker.utils.PermissionsUtils;

/**
 * Created by zhongyanli on 2017/11/9.
 */

public class WelcomActivity extends BaseActivity<WelcomPresenter> {
    @BindView(R.id.bannerView)
    BannerView bannerView;
    private int[] mWelcomImages = {R.mipmap.welcom};


    @Override
    protected WelcomPresenter createPresenter() {
        return new WelcomPresenter(this);
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcom);
        ButterKnife.bind(this);
        bannerView.setDatas(createWelcomData());
    }

    private List<BannerView.BannerData> createWelcomData() {
        List<BannerView.BannerData> out = new ArrayList<>();
        for (int resId : mWelcomImages) {
            out.add(new BannerView.BannerData(resId, null, null));
        }
        return out;
    }

    @Override
    protected boolean showActionBar() {
        return false;
    }
}
